package org.example.pojo;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Course {
    private int courseno = 0;
    private int pri = 0;
    private String coursename = "";
    private List<Integer> teacherNo = new ArrayList<>();
    private String detail = "";
    private int type = 0;
    private int nature = 0;

    public Course() { }

    public Course(int courseno, int pri, String coursename, List<Integer> teacherNo, String detail, int type, int nature) {
        this.courseno = courseno;
        this.pri = pri;
        this.coursename = coursename;
        this.teacherNo = teacherNo;
        this.detail = detail;
        this.type = type;
        this.nature = nature;
    }

    public int getCourseno() {
        return courseno;
    }

    public void setCourseno(int courseno) {
        this.courseno = courseno;
    }

    public String getCoursename() {
        return coursename;
    }

    public void setCoursename(String coursename) {
        this.coursename = coursename;
    }

    public int getPri() {
        return pri;
    }

    public void setPri(int pri) {
        this.pri = pri;
    }

    public void setTeacherNo(int x,int teacherNo) { this.teacherNo.add(x, teacherNo); }//设置教师编号

    public List<Integer> getTeacherNo() {
        return teacherNo;
    }

    public void setTeacherNo(List<Integer> teacherNo) {
        this.teacherNo = teacherNo;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getNature() {
        return nature;
    }

    public void setNature(int nature) {
        this.nature = nature;
    }

    @Override
    public String toString() {
        return "Course{" +
                "courseno=" + courseno +
                ", pri=" + pri +
                ", coursename='" + coursename + '\'' +
                ", teacherNo=" + teacherNo +
                ", detail='" + detail + '\'' +
                ", type=" + type +
                ", nature=" + nature +
                '}';
    }
}
